package com.example.hzly.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.hzly.entity.StoryLike;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface StoryLikeMapper extends BaseMapper<StoryLike> {
    @Select("SELECT * FROM story_like WHERE user_id = #{userId} AND story_id = #{storyId} LIMIT 1")
    StoryLike findByUserAndStory(@Param("userId") Long userId, @Param("storyId") Long storyId);
} 